package com.bupt.fmmall.dao;

import com.bupt.fmmall.entity.Product;
import com.bupt.fmmall.entity.ShoppingCart;
import com.bupt.fmmall.entity.ShoppingCartVO;

import java.util.List;

public interface ShoppingCartDao {

    //添加购物车项目
    int insert_ShoppingCart(ShoppingCart cart);
    //根据购物车id返回购物车信息
    ShoppingCart query_ShoppingCart_by_ShoppingCartId(int cartId_param);
    //1.根据用户id查询购物车内所有商品
    List<ShoppingCartVO> query_ShoppingCart_by_userName(String userName_param);
    //3.删除购物车中的商品
    int delete_ShoppingCart_product(Integer itemId,String customeruserName);
    //5.根据用户名和商品id批量删除购物车商品
    int delete_ShoppingCartGoods_by_userNameAndItemid(List<Integer> itemId,String customeruserName);
    //2.更新购物车项目
    int update_ShoppingCart_productNum(Integer itemId,String customeruserName,Integer itemNumber);
    //4.根据用户id和商品id查询购物车中部分商品
    List<ShoppingCartVO> query_ShoppingCart_by_userNameAndItemid(List<Integer> itemId,String customeruserName);

}
